<?php
class retrieve_client extends retrieve_base{

	private $module_display_options 	= array();
	
	/**
	* function produces abstract structure of modules db structure
	*
    * used to generate the table structure required abstract function that passes an abstract
	* representation of the desired table structure to the proper database module which will
	* interpet the abstract and convert it into a valid SQL Create table structure.
	*
	* @return Array list of abstract table definitions for this module
	*/
	function create_table(){
		$tables=array();
		/**
		* Table structure for table 'user_info'
		*/
		
		$fields = array(
			array("client_identifier"		,"unsigned integer"			,"NOT NULL"	,"auto_increment", "key"),
			array("client_name"				,"varchar(255)"				,""	,"default ''"),
			array("client_contact"			,"unsigned integer"			,""	,"default ''", "key"),
			array("client_logo_setting"		,"unsigned small integer"	,""	,"default ''"),
			array("client_strapline"		,"varchar(255)"				,""	,"default ''"),
			array("client_logo_alignment"	,"varchar(10)"				,""	,"default 'LEFT'"),
			array("client_robot_setting"	,"varchar(50)"				,""	,"default 'index,follow'"),
			array("client_revisit_setting"	,"unsigned small integer"	,""	,"default '29'"),
			array("client_date_created"		,"datetime"					,"" ,"default ''")
		);
		$primary ="client_identifier";
		$tables[count($tables)] = array("client",$fields,$primary);
		/**
		* Table data for table 'client'
		*/

		/**
		* Table structure for table 'domains'
		*/
		$fields = array(
		array("domain_identifier"	,"unsigned integer"	,"NOT NULL"	,"auto_increment"),
		array("domain_client"		,"unsigned integer"	,"NOT NULL"	,"default '0'"),
		array("domain_name"			,"varchar(255)"		,"NULL"		,"default ''")
		);
		
		$primary="domain_identifier";
		$tables[count($tables)] = array("domain",$fields,$primary);
		/**
		* Table structure for table 'site_footer_data'
		*/
		$fields = array(
		array("sfd_identifier"	,"unsigned integer"	,"NOT NULL"	,"auto_increment","key"),
		array("sfd_client"		,"unsigned integer"	,"NOT NULL"	,"default '0'"),
		array("sfd_text"		,"text"				,"NULL"		,"default ''")
		);
		
		$primary="sfd_identifier";
		$tables[count($tables)] = array("site_footer_data",$fields,$primary);


/*		$sql = "insert into domain (domain_client,domain_name) values (1,'".$this->parent->domain."')";
		$this->db->query($sql);
		$sql = "insert into domain (domain_client,domain_name) values (1,'localhost')";
		$this->db->query($sql);
		*/
		return $tables;
	}

}
?>